#ifndef _client_session_layer_h
#define _client_session_layer_h

/* operation codes definition */
enum {ADD_OP, SUB_OP, MULT_OP, DIV_OP};

/* request package data type */
typedef struct req_package
{
	unsigned char opcode;
	double op1;
	double op2;
} req_packageT;

/* answer package data type */
typedef struct ans_package
{
	double ans;
} ans_packageT;

/* make request package ready to send to server */
req_packageT make_req_package(double op1, double op2, int opCode);

/* unmake answer package, leave answer ready to print */
double unmake_ans_package(ans_packageT pAns);

/* request an operation and wait for the answer */
double doOperation(double op1, double op2, int opCode);

#endif
